﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Models;

namespace Providers
{
    /// <summary>
    /// Interface for the user configuration provider
    /// </summary>
    public interface IUserConfigurationProvider
    {
        /// <summary>
        /// Load the users configuraation data
        /// </summary>
        /// <param name="errorMsg">Any error message that is generated as part of this process</param>
        /// <returns>The loaded user configuration</returns>
        UserConfiguration LoadUserConfiguration(out string errorMsg);
        
        /// <summary>
        /// Save the current state of the users configuration
        /// </summary>
        /// <param name="userConfig">The user configuration data to save</param>
        /// <param name="errorMsg">Any error message that is generated as part of this process</param>
        /// <returns>True if the save was successful, otherwise false</returns>
        bool SaveUserConfiguration(UserConfiguration userConfig, out string errorMsg);
    }
}
